package com.qyhl.module_practice.volunteer.sign;


import com.qyhl.webtv.commonlib.entity.UpTokenBean;
import com.qyhl.webtv.commonlib.entity.civilized.PracticeListBean;
import com.qyhl.webtv.commonlib.entity.civilized.PracticeSignBean;
import com.qyhl.webtv.commonlib.entity.civilized.PracticeSignTagBean;

import java.util.List;

public class PracticeVolunteerSignPresenter implements PracticeVolunteerSignContract.PracticeVolunteerSignPresenter {
    private PracticeVolunteerSignModel mModel;
    private PracticeVolunteerSignActivity mView;

    PracticeVolunteerSignPresenter(PracticeVolunteerSignActivity mView) {
        this.mView = mView;
        this.mModel = new PracticeVolunteerSignModel(this);
    }

    @Override
    public void getTagList() {
        mModel.getTagList();
    }

    @Override
    public void getInstList(String instId) {
        mModel.getInstList(instId);
    }

    @Override
    public void getTeamTag() {
        mModel.getTeamTag();
    }

    @Override
    public void getToken(boolean isUpload) {
        mModel.getToken(isUpload);
    }


    @Override
    public void doSignForPublic(String name, String phone, String sex, String actId) {
        mModel.doSignForPublic(name, phone, sex, actId);
    }

    @Override
    public void doSignForVolunteer(String sex, String permanentAddress, String politicalFace, String name, String phone,
                                   String logo, String tagIds, String orgIds, String orgName, String orgDes, String orgInsId,
                                   String orgType, String orgCon, String workAddress,String idCard) {
        mModel.doSignForVolunteer(sex, permanentAddress, politicalFace, name, phone, logo, tagIds, orgIds, orgName, orgDes, orgInsId, orgType, orgCon,workAddress,idCard);
    }

    @Override
    public void getTagSuccess(PracticeSignBean bean) {
        mView.getTagSuccess(bean);
    }

    @Override
    public void getTagFailure(String msg) {
        mView.getTagFailure(msg);
    }

    @Override
    public void signSuccess(String msg) {
        mView.signSuccess(msg);
    }

    @Override
    public void signFailure(List<PracticeVolunteerSignActivity.ContractBean> beanList, String msg) {
        mView.signFailure(beanList, msg);
    }

    @Override
    public void getTokenSuccess(UpTokenBean data, boolean isUpload) {
        mView.getTokenSuccess(data, isUpload);
    }

    @Override
    public void getTokenError(boolean isUpload) {
        mView.getTokenError(isUpload);
    }

    @Override
    public void setList(List<PracticeListBean> beanList) {
        mView.setList(beanList);
    }

    @Override
    public void setError(String msg) {
        mView.setError(msg);
    }

    @Override
    public void getTeamTagSuccess(List<PracticeSignTagBean> beanList) {
        mView.getTeamTagSuccess(beanList);
    }

    @Override
    public void getTeamTagError(String msg) {
        mView.getTeamTagError(msg);
    }
}
